package cn.com.connext.scrm.web.rest.enums;

/**
 * @Description:
 * @author: ZHaoYul
 * @date: 2021/4/29 16:41
 */
public enum LogisticsPushStateEnum {
    LOGISTICS_PUSH_10(10, "未下发"),
    LOGISTICS_PUSH_20(20, "下发中"),
    LOGISTICS_PUSH_30(30, "下发成功");
    private int code;
    private String name;

    LogisticsPushStateEnum(int code, String name) {
        this.code = code;
        this.name = name;
    }

    public int getCode() {
        return code;
    }

    public String getName() {
        return name;
    }

    //根据code 取名称
    public String getName(int code) {
        for (LogisticsPushStateEnum o : LogisticsPushStateEnum.values()){
            if (code == o.getCode()) {
                return o.getName();
            }
        }
        return null;
    }
}
